package com.yuan.algorithms.practice201504;

import java.util.Scanner;

public class HD2044一只小蜜蜂 {

	static long sum = 0;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long[] fibonacci = new long[50];
		fibonacci[0] = 1;
		fibonacci[1] = 1;
		fibonacci[2] = 2;
		for (int i = 3; i < fibonacci.length; i++) {
			fibonacci[i] = fibonacci[i-1]+fibonacci[i-2];
		}
		while (sc.hasNext()) {
			int n = sc.nextInt();
			for (int i = 0; i < n; i++) {
				sum = 0;
				int a = sc.nextInt();
				int b = sc.nextInt();
				System.out.println(fibonacci[b-a]);
				//f(a,b);
				//System.out.println(sum);
			}
		}

	}

	private static void f(int a, int b) {
		if (a>b) {
			return;
		}
		if (a==b) {
			sum++;
		}
		f(a+1, b);
		f(a+2, b);
	}

}
